xen/arm: fix affected memory range by dcache clean functions
authorStefano Stabellini <sstabellini@kernel.org>
Fri, 3 Mar 2017 01:15:26 +0000 (17:15 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 6 Mar 2017 18:48:08 +0000 (10:48 -0800)
commitcaf053fb545329e58ac891d197f96503e3121049
treedc3eb18e96bea9ea2339ac3a21c5a172614185a2
parent06857f3436b987fb4942288d8f750c0a1854976c
xen/arm: fix affected memory range by dcache clean functions

clean_dcache_va_range and clean_and_invalidate_dcache_va_range don't
calculate the range correctly when "end" is not cacheline aligned. As a
result, the last cacheline is not skipped. Fix the issue by aligning the
start address to the cacheline size.

In addition, make the code simpler and faster in
invalidate_dcache_va_range, by removing the module operation and using
bitmasks instead. Also remove the size adjustments in
invalidate_dcache_va_range, because the size variable is not used later
on.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
xen/include/asm-arm/page.h